package Game;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
import Levels.Level1;
import Levels.LevelLoader;
/**
 * this class extends GameCanvas with holds all of the running componits
 * @author DevBo
 */
public class Mainth extends GameCanvas{
	/**
	 * using Level Loader to load differt level loadouts (not fully used in this game)
	 */
	public static LevelLoader level=new LevelLoader();
	public static void main(String[] args){
		/**
		 * Creates a simple Frame.
		 */
		{
			Mainth Canvas=new Mainth(750,400);
			JFrame frame=new JFrame();
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			frame.setResizable(false);
			frame.add(Canvas);
			frame.pack();
			frame.setSize(750, 400);
			frame.setVisible(true);
		}
	}
	/**
	 * 
	 * @param w Width of frame
	 * @param h Height of frame
	 */
	public Mainth(int w,int h){
		super(w,h);
		/** Key Event Listener */
		this.addKeyListener(this);
	}
	/** anything that needs to be updated exept visuals */
	void Update() {
		level.Level().update();
	}
	/** any visual effects or pictures that need to be updated */
	void Paint(Graphics g) {
		level.Level().paint(g);
	}
}